home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 3
/
Cream of the Crop 3.iso
/
clipper
/
ks94an.zip
/
DAYFIRST.HDR
< prev
next >
Wrap
Text File
|
1994-04-25
|
1KB
|
49 lines
/******************************************************************************
The Klipper Library, for CA-Clipper 5.x
Copyright (c), 1994, Wallace Information Systems Engineering
FUNCTION:
_DayFirst( dDate ) --> dFirstDay
PARAMETERS:
dDate : Date from which first day of month is to be derived
SHORT:
Return the DATE of the first day of the month in date passed.
DESCRIPTION:
_DayFirst() returns the DATE on which the month in dDate began. If the date
03/22/93 is passed to the function, it returns 03/01/93.
This is very simple, but it might be useful during leap years since it does
respect them.
If dDate is NOT a valid date type, _DayFirst returns an empty date.
This is another of those functions that I once had a need for, but forgot
what it was. It essentially just returns mm/01/yy for any given date passed.
It can be useful when you want to "keep it clean" as in:
dRangeLow = _DayFirst(date())
dRangeHi = _DayLast(date())
This way you do not have to do all the substring manipulation every time you
want the month begin date of the current (or specified) date. This is just
cleaner and easier on the eye.
NOTE:
EXAMPLE:
t = _DayFirst( ctod('03/22/93') )
Result: (t == ctod('03/01/93') ) = TRUE
******************************************************************************/